import serial
import time

if __name__ == '__main__':
    ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
    ser.reset_input_buffer()
    while(True):
        inp = raw_input()
        ser.write(str.encode(inp))
        time.sleep(3)
